object dmCad: TdmCad
  OldCreateOrder = False
  Height = 496
  Width = 433
  object sqlCad: TSQLDataSet
    SchemaName = 'sysdba'
    CommandText = 
      'select * from Reservas where idreserva=:idreserva and status not' +
      ' like '#39'A'#39
    DbxCommandType = 'Dbx.SQL'
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'idreserva'
        ParamType = ptInput
      end>
    SQLConnection = dm.MedicoPro
    Left = 64
    Top = 40
  end
  object dspCad: TDataSetProvider
    DataSet = sqlCad
    Options = [poAllowCommandText, poUseQuoteChar]
    UpdateMode = upWhereKeyOnly
    Left = 128
    Top = 40
  end
  object cdsCadConvenios: TClientDataSet
    Aggregates = <>
    CommandText = 'select * from CONVENIOS where IDCONVENIO = :idconvenio'
    FieldDefs = <
      item
        Name = 'IDCONVENIO'
        Attributes = [faRequired]
        DataType = ftInteger
      end
      item
        Name = 'NOMECONVENIO'
        Attributes = [faRequired]
        DataType = ftString
        Size = 50
      end
      item
        Name = 'TIPODESCONTO'
        Attributes = [faFixed]
        DataType = ftString
        Size = 1
      end
      item
        Name = 'VALORDESCONTO'
        DataType = ftFMTBcd
        Precision = 15
        Size = 2
      end>
    IndexDefs = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'idconvenio'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    StoreDefs = True
    AfterPost = ClientDataSetAfterPost
    AfterDelete = ClientDataSetAfterPost
    OnNewRecord = cdsCadConveniosNewRecord
    Left = 72
    Top = 144
    object cdsCadConveniosIDCONVENIO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'IDCONVENIO'
      ProviderFlags = [pfInWhere]
    end
    object cdsCadConveniosNOMECONVENIO: TStringField
      DisplayLabel = 'Nome do Conv'#234'nio'
      FieldName = 'NOMECONVENIO'
      Required = True
      Size = 50
    end
    object cdsCadConveniosTIPODESCONTO: TStringField
      FieldName = 'TIPODESCONTO'
      FixedChar = True
      Size = 1
    end
    object cdsCadConveniosVALORDESCONTO: TFMTBCDField
      FieldName = 'VALORDESCONTO'
      Precision = 15
      Size = 2
    end
  end
  object cdsCadEspecialidades: TClientDataSet
    Aggregates = <>
    CommandText = 
      'select * from ESPECIALIDADES where IDESPECIALIDADE = :idespecial' +
      'idade'
    Params = <
      item
        DataType = ftInteger
        Name = 'idespecialidade'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    AfterPost = ClientDataSetAfterPost
    AfterDelete = ClientDataSetAfterPost
    OnNewRecord = cdsCadEspecialidadesNewRecord
    Left = 184
    Top = 144
    object cdsCadEspecialidadesIDESPECIALIDADE: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'IDESPECIALIDADE'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cdsCadEspecialidadesNOMEESPECIALIDADE: TStringField
      DisplayLabel = 'Especialidade'
      FieldName = 'NOMEESPECIALIDADE'
      Required = True
      Size = 50
    end
  end
  object cdsCadConvenioProcedimentos: TClientDataSet
    Aggregates = <>
    CommandText = 
      'select * from CONVENIOSPROCEDIMENTOS where idconvenio = :pIdConv' +
      'enio'
    Params = <
      item
        DataType = ftInteger
        Name = 'pIdConvenio'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    AfterPost = ClientDataSetAfterPost
    AfterDelete = ClientDataSetAfterPost
    Left = 72
    Top = 208
    object cdsCadConvenioProcedimentosIDCONVENIO: TIntegerField
      DisplayLabel = 'Conv'#234'nio'
      FieldName = 'IDCONVENIO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cdsCadConvenioProcedimentosIDPROCEDIMENTO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'IDPROCEDIMENTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cdsCadConvenioProcedimentosPROCEDIMENTO: TStringField
      DisplayLabel = 'Procedimento'
      FieldKind = fkLookup
      FieldName = 'PROCEDIMENTO'
      LookupDataSet = cdsCadProcedimentos
      LookupKeyFields = 'IDPROCEDIMENTO'
      LookupResultField = 'NOMEPROCEDIMENTO'
      KeyFields = 'IDPROCEDIMENTO'
      Lookup = True
    end
    object cdsCadConvenioProcedimentosTIPODESCONTO: TStringField
      DisplayLabel = 'Tipo de Desconto'
      FieldName = 'TIPODESCONTO'
      ProviderFlags = [pfInUpdate]
      FixedChar = True
      Size = 1
    end
    object cdsCadConvenioProcedimentosVALORDESCONTO: TFMTBCDField
      DisplayLabel = 'Valor do Desconto'
      FieldName = 'VALORDESCONTO'
      ProviderFlags = [pfInUpdate]
      Precision = 15
      Size = 2
    end
  end
  object cdsCadProcedimentos: TClientDataSet
    Aggregates = <>
    CommandText = 
      'select * from Procedimentos where IdProcedimento = :IdProcedimen' +
      'to'
    Params = <
      item
        DataType = ftInteger
        Name = 'IdProcedimento'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    AfterPost = ClientDataSetAfterPost
    AfterDelete = ClientDataSetAfterPost
    OnNewRecord = cdsCadProcedimentosNewRecord
    Left = 296
    Top = 144
    object cdsCadProcedimentosIDPROCEDIMENTO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'IDPROCEDIMENTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cdsCadProcedimentosNOMEPROCEDIMENTO: TStringField
      DisplayLabel = 'Procedimento'
      FieldName = 'NOMEPROCEDIMENTO'
      Required = True
      Size = 50
    end
    object cdsCadProcedimentosDESCRICAO: TMemoField
      DisplayLabel = 'Descri'#231#227'o'
      FieldName = 'DESCRICAO'
      BlobType = ftMemo
      Size = 1
    end
  end
  object cdsCadMedicos: TClientDataSet
    Aggregates = <>
    CommandText = 'select * from Medicos where idmedico = :idmedico'
    Params = <
      item
        DataType = ftInteger
        Name = 'idmedico'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    AfterPost = ClientDataSetAfterPost
    AfterDelete = ClientDataSetAfterPost
    OnNewRecord = cdsCadMedicosNewRecord
    Left = 72
    Top = 296
    object cdsCadMedicosIDMEDICO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'IDMEDICO'
      Required = True
    end
    object cdsCadMedicosNOMEMEDICO: TStringField
      DisplayLabel = 'Nome'
      FieldName = 'NOMEMEDICO'
      Required = True
      Size = 50
    end
    object cdsCadMedicosIDESPECIALIDADE: TIntegerField
      DisplayLabel = 'C'#243'digo da Especialidade'
      FieldName = 'IDESPECIALIDADE'
    end
    object cdsCadMedicosCRM: TStringField
      FieldName = 'CRM'
      Required = True
    end
    object cdsCadMedicosTELEFONE: TStringField
      DisplayLabel = 'Telefone'
      FieldName = 'TELEFONE'
      EditMask = '!\(99\)0000-0000;1;_'
    end
    object cdsCadMedicosNASCIMENTO: TDateField
      DisplayLabel = 'Data de Nascimento'
      FieldName = 'NASCIMENTO'
      EditMask = '!99/99/9999;1;_'
    end
    object cdsCadMedicosFOTO: TMemoField
      DisplayLabel = 'Foto'
      FieldName = 'FOTO'
      BlobType = ftMemo
      Size = 1
    end
    object cdsCadMedicosESPECIALIDADE: TStringField
      DisplayLabel = 'Especialidade'
      FieldKind = fkLookup
      FieldName = 'ESPECIALIDADE'
      LookupDataSet = cdsCadEspecialidades
      LookupKeyFields = 'IDESPECIALIDADE'
      LookupResultField = 'NOMEESPECIALIDADE'
      KeyFields = 'IDESPECIALIDADE'
      Lookup = True
    end
  end
  object cdsCadPacientes: TClientDataSet
    Aggregates = <>
    CommandText = 'select * from paciente where idpaciente = :idpaciente'
    Params = <
      item
        DataType = ftInteger
        Name = 'idpaciente'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    AfterPost = ClientDataSetAfterPost
    AfterDelete = ClientDataSetAfterPost
    OnNewRecord = cdsCadPacientesNewRecord
    Left = 184
    Top = 296
    object cdsCadPacientesIDPACIENTE: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'IDPACIENTE'
      Required = True
    end
    object cdsCadPacientesNOMEPACIENTE: TStringField
      DisplayLabel = 'Paciente'
      FieldName = 'NOMEPACIENTE'
      Required = True
      Size = 50
    end
    object cdsCadPacientesIDCONVENIO: TIntegerField
      DisplayLabel = 'Conv'#234'nio'
      FieldName = 'IDCONVENIO'
    end
    object cdsCadPacientesTELEFONE: TStringField
      DisplayLabel = 'Telefone'
      FieldName = 'TELEFONE'
    end
    object cdsCadPacientesCELULAR: TStringField
      DisplayLabel = 'Celular'
      FieldName = 'CELULAR'
    end
    object cdsCadPacientesENDERECO: TStringField
      DisplayLabel = 'Endere'#231'o'
      FieldName = 'ENDERECO'
      Size = 100
    end
    object cdsCadPacientesNASCIMENTO: TDateField
      DisplayLabel = 'Nascimento'
      FieldName = 'NASCIMENTO'
      EditMask = '!99/99/9999;1;_'
    end
    object cdsCadPacientesFOTO: TMemoField
      DisplayLabel = 'Foto'
      FieldName = 'FOTO'
      BlobType = ftMemo
      Size = 1
    end
  end
  object cdsCadReservas: TClientDataSet
    Aggregates = <>
    CommandText = 
      'select * from Reservas where idreserva=:idreserva and status not' +
      ' like '#39'A'#39
    Params = <
      item
        DataType = ftInteger
        Name = 'idreserva'
        ParamType = ptUnknown
      end>
    ProviderName = 'dspCad'
    Left = 288
    Top = 296
  end
  object qryInsereReserva: TSQLQuery
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.MedicoPro
    Left = 64
    Top = 400
  end
end
